<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>input 事件</title>
</head>
<body>
<div id="app">
  <form action="">
    <label for="content">请输入内容
      <!--input 事件：内容发生改变，黏贴，删除、剪切都会进行触发-->
      <input type="text" name="content" id="content"  v-on:input="contentChanged">
    </label>
  </form>
</div>

<script type="module">
    import {createApp} from "../../../js/vue.esm-browser.js";

    let app = createApp(
        {
            setup(){
              function contentChanged(event) {
                console.log(event);
                let element = document.querySelector("#content");
                console.log(element.value);
              }
                return {
                  contentChanged,
                }
            }
        }
    );

    app.mount("#app")
</script>
</body>
</html>